import i18n from "@/locale";
import { transUpperToCamel } from "@/libs/utils";

/**
 * show-lang-name
 */
function showLangName(lang = "") {
  const l = lang.toLowerCase();

  switch (l) {
    case "zh-cn":
      return i18n.t("LANGS.ZhCN");
    case "zh-xg":
      return i18n.t("LANGS.ZhXG");
    case "en":
      return i18n.t("LANGS.En");
    default:
      return "";
  }
}
function showLangModule(origin = "") {
  return i18n.t(`BUSINESS_ROUTES.${transUpperToCamel(origin)}`);
}

export default {
  showLangName,
  showLangModule,
};
